import com.typesafe.sbt.packager.docker._
import NativePackagerHelper._

name := "hb"

version := "1.3.2"

scalaVersion := "2.11.7"

libraryDependencies ++= Seq(
  "org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.4",
  "org.apache.httpcomponents" % "httpmime" % "4.3.5",
  "org.apache.httpcomponents" % "httpclient" % "4.3.5",
  "net.debasishg" %% "redisclient" % "3.0",
  "mysql" % "mysql-connector-java" % "5.1.31",
  "commons-dbutils" % "commons-dbutils" % "1.5",
  "org.javassist" % "javassist" % "3.17.1-GA",
  "com.aliyun.oss" % "aliyun-sdk-oss" % "2.0.7",
  "com.aliyun" % "aliyun-java-sdk-dm" % "2.0.0-rc1",
  "com.aliyun" % "aliyun-java-sdk-core" % "2.2.2",
  "com.aliyun.opensearch" % "aliyun-sdk-opensearch" % "2.1.3",
  "com.alibaba" % "druid" % "1.0.15",
  "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.6.1",
  "net.jpountz.lz4" % "lz4" % "1.3.0",
  "io.swagger" %% "swagger-play2" % "1.5.0",
  "com.github.stuxuhai" % "jpinyin" % "1.1.1",
  specs2 % Test,
  "org.scalatest" %% "scalatest" % "2.2.4" % "test"
)

resolvers := Seq(Resolver.defaultLocal,"handuser" at "http://maven.handuser.com/maven2/")++resolvers.value

val root = (project in file(".")).enablePlugins(PlayScala).enablePlugins(SbtWeb).enablePlugins(DockerPlugin).enablePlugins(JavaAppPackaging)

javaOptions in Test ++= Seq(
  "-Dconfig.file=conf/debug.conf"
)



pipelineStages := Seq(gzip,digest)

DigestKeys.algorithms += "sha1"

includeFilter in digest := "*.html" || "*.css" || "*.js" || "*.png" || "*.jpg"

includeFilter in gzip := "*.html" || "*.css" || "*.js"

TwirlKeys.templateImports += "common.Tool._"

javaOptions in Universal ++= Seq(
  "-Dpidfile.path=/dev/null"
)

dockerBaseImage := "java:8-jre"

packageName in Docker := packageName.value

dockerExposedPorts := Seq(9000)

dockerRepository :=Some("registry.aliyuncs.com/zx")
